import React, { Component } from 'react'
import { BrowserRouter as Router, Route, Redirect } from 'react-router-dom'
import {
  Home,
  Shop,
  Peisong,
  Distributors,
  Food,
  City,
  Delivery,
  Enterprise
} from './views'
export default class App extends Component {
  render() {
    return (
      <div>
        <Router>
          <Route path="/" exact render={() => <Redirect to="/home" />}></Route>
          <Route path="/home" component={Home}></Route>
          <Route path="/shop" component={Shop}></Route>
          <Route path="/peisong" component={Peisong}></Route>
          <Route path="/distributors" component={Distributors}></Route>
          <Route path="/food" component={Food}></Route>
          <Route path="/city" component={City}></Route>
          <Route path="/delivery" component={Delivery}></Route>
          <Route path="/enterprise" component={Enterprise}></Route>
        </Router>
      </div>
    )
  }
}
